package org.scalpel.common;

import java.util.Arrays;
import java.util.List;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.client.XmlRpcClient;

public class ParseObjects {
	
	XmlRpcClient fClient = null;
	String fInspectorName = "";
	
	public ParseObjects(String inspectorName, XmlRpcClient client){
		fClient = client;
		fInspectorName = inspectorName;
	}
	
	@SuppressWarnings("unchecked")
	public String[] getHHObjectList(){
		Object[] res = null;
    try {
      res = (Object[]) fClient.execute( fInspectorName + ".getObjectNameList", new Object[]{});
    } catch (XmlRpcException ex) {
      // TODO Auto-generated catch block
      ex.printStackTrace();
    }
  	return Arrays.copyOf(res, res.length, String[].class);
	}
}
